#ifndef NYU_VAR_LIST_H_
#define NYU_VAR_LIST_H_

#include "nyu_scope.h"

struct NyuVarData {
    long val;
    NyuVarData *parent;
    NyuScope *scope;
};

typedef struct NyuVarList NyuVarList;
struct NyuVarList {
    char *name;
    NyuVarData *data;
    NyuVarList *next;
};

NyuVarList *nyu_var_list_prepend(NyuVarList *list,
                                 char *name,
                                 NyuVarData *data);

NyuVarList *nyu_var_list_find(NyuVarList *list, const char *name);

NyuVarData *nyu_var_data_new(NyuVarData *parent, long val, NyuScope *scope);

#endif /* NYU_VAR_LIST_H_ */
